<!DOCTYPE html>
	<head>
		<title>Customer: Home</title>
	</head>
	<style>
		body{
			background-color:moccasin;
		}
	</style>
	<body>
		<div>
			<?php $this->load->view('header');?>
		</div>
		<div style="clear:both;">
			<h1>Home</h1>
			<div style="text-align:center;font-size:25px;">
			<strong>Products:</strong>
			<br>
			<table align="center">
			<?php 
				$count = 0;
				foreach ($products as $product) {
					if ($count == 3) {
						echo "</tr>";
						$count = 0;
					}
					if ($count == 0) {
						echo "<tr>";
					}
					echo "<td>";
					echo "<div style='padding-right:40px;'> <img src='" . base_url() . "images/product/" . $product->photo_url . "' width='250px' height='150px' /> </div>";
					echo "<div style='padding-right:40px;'>" . anchor("home/read/$product->id",$product->name) . "</div>";
					echo "<div style='padding-right:40px;padding-bottom:20px;'> $".$product->price . "</div>";
					$count++;
					echo "</td>";
				}
				if($count>0) { echo "</tr>";}
			?>	
			</table>
			</div>
		</div>
	</body>
</html>